Image Registry topic
Classes
- ImageDescriptor Image Registry
- Defines an image. For marker this class can be used to set the image of the marker icon.
Functions
-
clearRegisteredImages(
) → Future< Image Registryvoid> - Remove all registered bitmaps from image registry.
-
getRegisteredImages(
) → Future< Image RegistryList< ImageDescriptor> > - Get all registered bitmaps from image registry.
-
registerBitmapImage(
{required ByteData bitmap, double imagePixelRatio = 1.0, double? width, double? height}) → Future< Image RegistryImageDescriptor> -
Register bitmap image to image registry.
Returns ImageDescriptor that can be used to reference the bitmap when creating
MarkerOptions.
bitmap
is the bytes of bitmap to be registered, in PNG format. SetimagePixelRatio
if bitmap is larger tha it's intended display size. For example, if image width is 64 pixels and it need's to be displayed in 32 logical pixel size, setimagePixelRatio
to 2. Optionally specify wanted logical pixel size withwidth
orheight
. If onlywidth
orheight
is specified the other dimension is scaled according to the aspect ratio of the bitmap. -
unregisterImage(
ImageDescriptor imageDescriptor) → Future< Image Registryvoid> - Delete previously registered bitmap from image registry.
Exceptions / Errors
- ImageDecodingFailedException Image Registry
- registerBitmapImage failed to decode bitmap from byte array.